<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{ path: '/' }">主页</el-breadcrumb-item>
        <el-breadcrumb-item>商品管理</el-breadcrumb-item>
        <el-breadcrumb-item>商品列表</el-breadcrumb-item>
      </el-breadcrumb>
    </el-card>

    <el-card class="box-card">
      <el-tabs value="first" @tab-click="goClick">
        <el-tab-pane label="图片形式" name="first">
          <card-format ref="cardFormat" />
        </el-tab-pane>
        <el-tab-pane label="表格形式" name="second">
          <form-format />
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>

<script>
import CardFormat from '@/views/goodslist/components/cardformat.vue'
import FormFormat from '@/views/goodslist/components/formformat.vue'
export default {
  components: {
    CardFormat,
    FormFormat
  },
  methods: {
    goClick() {
      this.$refs.cardFormat.automatic()
    },
    getTypeList(index) {
      console.log(index)
      // console.log(this.index)
      this.current = index
    }
  }
}
</script>

<style lang="scss" scoped>
  .app-container{
    min-width: 1200px;
    .box-card{
      margin-bottom: 20px;
    }
  }
</style>

